package com.aisile.shop.controller;

import com.aisile.pojo.TbItemCat;
import com.aisile.sellergoods.service.ItemCatService;
import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @标题 ItemCatController
 * @作者 Mr.chen
 * @创建日期 2019/1/3 10:35
 * @版本号 1.0
 **/
@RestController
@RequestMapping("itemCat")
public class ItemCatController {

    @Reference(timeout = 60000)
    ItemCatService itemCatService;

    @RequestMapping("findByParentId")
    public List<TbItemCat> findByParentId(long parentId){
        return itemCatService.findByParentId(parentId);
    }
    @RequestMapping("findAll")
    public List<TbItemCat> findAll(){
        return itemCatService.findAll();
    }
    @RequestMapping("findOne")
    public TbItemCat findOne(long id){
        return itemCatService.findOne(id);
    }
}
